package com.gee.spring.boot.rpf.controller.fico;

import com.gee.spring.boot.rpf.controller.fico.request.CreRequest;
import com.gee.spring.boot.rpf.service.FiCoService;
import com.gee.spring.boot.rpf.util.result.Result;
import com.gee.spring.boot.rpf.util.result.ResultUtil;
import com.gee.thread.flow.executor.ExecuteContext;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * desc:
 *
 * @author gee wrote on  2021-02-02 09:40:38
 */
@RestController
@RequestMapping("/fiCo")
public class FiCoController {

    @Resource
    private FiCoService fiCoService;

    @PostMapping("/credit")
    public Result credit(@RequestBody CreRequest creRequest){
        ExecuteContext<RequestWrapper> executeContext = fiCoService.credit(creRequest);
        return ResultUtil.successWithData(executeContext);
    }
}
